#ifndef IVIEWPORT_H
#define IVIEWPORT_H

#include "Camera/Camera.h"
#include "Graphics/IRenderTarget.h"
#include "Graphics/Colour.h"


namespace tyro
{
	namespace Graphics
	{
		class IViewport
		{
		public:

			IViewport(Camera::Camera* camera, IRenderTarget* target, FLOAT_32 left, FLOAT_32 top, FLOAT_32 width, FLOAT_32 height);
			
			void Update(void);

			Camera::Camera* GetCamera() const;
			void SetCamera(Camera::Camera* camera);
			IRenderTarget* GetRenderTarget() const;
			void SetRenderTarget(IRenderTarget* target);
			tyro::FLOAT_32 GetRelLeft() const;
			void SetRelLeft(tyro::FLOAT_32 val);
			tyro::FLOAT_32 GetRelHeight() const;
			void SetRelHeight(tyro::FLOAT_32 val);
			tyro::FLOAT_32 GetRelWidth() const ;
			void SetRelWidth(tyro::FLOAT_32 val);
			tyro::FLOAT_32 GetRelTop() const;
			void SetRelTop(tyro::FLOAT_32 val);
			tyro::UINT_32 GetActHeight() const;
			void SetActHeight(tyro::UINT_32 val);
			tyro::UINT_32 GetActWidth() const;
			void SetActWidth(tyro::UINT_32 val);
			tyro::UINT_32 GetActTop() const;
			void SetActTop(tyro::UINT_32 val);
			tyro::UINT_32 GetActLeft() const ;
			void SetActLeft(tyro::UINT_32 val);
			tyro::Graphics::Colour GetBackColour() const;
			void SetBackColour(tyro::Graphics::Colour val);
			tyro::FLOAT_32 GetDepthClear() const;
			void SetDepthClear(tyro::FLOAT_32 val);
			bool GetClearEachFrame();
			void UpdateDimensions(void);

			tyro::UINT_32 GetClearBuffers(void) const;



		protected:

			Camera::Camera* activeCamera;
			
			Graphics::IRenderTarget* target;
			

			FLOAT_32 relLeft, relTop, relWidth, relHeight;

			
			UINT_32 actLeft, actTop, actWidth, actHeight;
			
			
			Colour backColour;
			
			FLOAT_32			depthClear;
			bool				clearEachFrame;
			tyro::UINT_32		clearBuffers;



		private:
		};
	}
}
#endif